<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<HTML
        xmlns="http://www.w3.org/1999/xhtml"><HEAD><META content="IE=11.0000"
                                                         http-equiv="X-UA-Compatible">

    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <TITLE>发布新投票</TITLE> <LINK href="css/style.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-1.8.3.min.js"></script>

    <script>
    $(function () {
        $("#buttonvoto").click(function () {

           $.ajax({
               type:"post",
               url:"tou",
               data:{name1:$("#title").val(),
                   lx1:$("#lx").val(),
                   xuan1:$("#xuan").val(),
                   xuan2:$("#xuan1").val(),
                   xuan3:$("#xuan2").val()},
               dataType:"text",
               success:function (ress) {
                   if (ress == "s") {
                       alert('失败');
                   } else if(ress=="o"){
                       alert('成功');
                       location.href = "list";
                   }else{
                       alert('标题已存在');
                   }
               }
           })
        })

    })
    </script>

    <META name="GENERATOR" content="MSHTML 11.00.10586.420"></HEAD>
<BODY>
<DIV class="wrap" id="header"><IMG src="images/logo.gif"> </DIV>
<DIV class="wrap" id="navbar">
    <DIV class="profile">您好，admin		 <SPAN class="return"><A href="lie">返回列表</A></SPAN>
        <SPAN class="addnew"><A href="xin">添加新投票</A></SPAN>
        <SPAN class="modify"><A href="http://localhost:8080/myVote/Subject-modify.action">维护</A></SPAN>
        <SPAN class="return"><A
                href="index">注销</A></SPAN>	 </DIV>
    <DIV class="search">
       </DIV></DIV>
<DIV class="box" id="voteManage">
    <H2>添加新投票</H2>
    <DIV class="content">

            <DL>
                <DT>投票内容：</DT>
                <DD><INPUT name="struts.token.name" type="hidden" value="token"> <INPUT name="token" type="hidden" value="B1XPKLEQ7DQ6DNVWKBARPOY4HLYYXDE6">
                    <INPUT name="subject.title" class="input-text" id="title" type="text">
                </DD>
                <DT>投票类型：</DT>
                <DD><INPUT name="subject.type" id="lx" type="radio" value="1">单选				    <INPUT name="subject.type"
                                                                                                   type="radio" value="2">多选 </DD>
                <DT>投票选项：</DT>
                <DD id="voteoptions">
                    <P><INPUT name="options" class="input-text" type="text" id="xuan"></P>
                    <P><INPUT name="options" class="input-text" type="text" id="xuan1"></P>
                    <P><INPUT name="options" class="input-text" type="text" id="xuan2"></P>
                </DD>
                <DT></DT>
                <DD class="button" id="buttonvoto"><INPUT  type="image" src="imags/button_submit.gif">
				 <A href="list">取消操作</A>
                </DD></DL></DIV></DIV>
<DIV class="wrap" id="footer">	北大青鸟 © 版权所有 </DIV></BODY></HTML>
